// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'

import store from './store'

import router from './router'
import VueRouter from 'vue-router'

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import axios from 'axios'
import VueAxios from 'vue-axios'

import VueCookies from 'vue-cookies'

Vue.config.productionTip = false;
axios.defaults.headers['Content-Type'] = "application/x-www-form-urlencoded";

import cfg from "./cfg/cfg";

// axios.defaults.withCredentials=true;

// axios.defaults.headers['Access-Control-Allow-Origin'] = "*";
// axios.defaults.headers['Access-Control-Allow-Headers'] = "X-Requested-With";
axios.defaults.headers['Access-Control-Allow-Credentials'] = "true";

Vue.use(ElementUI);
Vue.use(VueAxios, axios);
Vue.use(VueRouter);
Vue.use(store);
Vue.use(VueCookies);

Vue.prototype.$cfg = cfg;

/* eslint-disable no-new */
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app');
